﻿<navigation:Page x:Class="ImageTools.Demos.Views.Presentation" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:ImageTools.Demos.Views"
    xmlns:it="clr-namespace:ImageTools.Controls;assembly=ImageTools.Controls" 
    xmlns:itFilter="clr-namespace:ImageTools.Filtering;assembly=ImageTools.Filtering"
    xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
	xmlns:system="clr-namespace:System;assembly=mscorlib" 
    xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
    mc:Ignorable="d"
    d:DesignWidth="640" d:DesignHeight="480">

    <ScrollViewer Style="{StaticResource PageScrollViewerStyle}">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition />
            </Grid.RowDefinitions>

            <StackPanel>
                <TextBlock Style="{StaticResource HeaderTextStyle}" Text="image presentation" />
                <TextBlock Style="{StaticResource ContentTextStyle}" Text="Use filters to draw the images in different ways or resize the image when necessary." />
            </StackPanel>

            <StackPanel Grid.Row="1">
                <StackPanel Orientation="Horizontal" Height="180">
                    <local:Picture x:Name="DesertFilterImage1" Width="200" 
                        Title="Normal Image" Description="No Filter is applied." />

                    <local:Picture x:Name="DesertFilterImage2" Width="200" Margin="5,0,0,0" 
                        Title="Sepia Filter" Description="Old photo effect.">
                        <local:Picture.Filter>
                            <itFilter:Sepia />
                        </local:Picture.Filter>
                    </local:Picture>

                    <local:Picture x:Name="DesertFilterImage3" Width="200" Margin="5,0,0,0" 
                        Title="Grayscale" Description="Use a grayscale filter.">
                        <local:Picture.Filter>
                            <itFilter:GrayscaleBT709 />
                        </local:Picture.Filter>
                    </local:Picture>

                    <local:Picture x:Name="DesertFilterImage4" Width="200" Margin="5,0,0,0" 
                        Title="Inverted Colors" Description="This filter inverts the colors.">
                        <local:Picture.Filter>
                            <itFilter:Inverter />
                        </local:Picture.Filter>
                    </local:Picture>
                </StackPanel>

                <StackPanel Orientation="Horizontal" Height="180" Margin="0,10,0,0">
                    <local:Picture x:Name="BuildingFilterImage1" Width="200" 
                        Title="Normal Image" Description="No Filter is applied." />

                    <local:Picture x:Name="BuildingFilterImage2" Width="200" Margin="5,0,0,0" 
                        Title="Gaussian Filter" Description="Blurring the image.">
                        <local:Picture.Filter>
                            <itFilter:GaussianBlur Variance="2.8" />
                        </local:Picture.Filter>
                    </local:Picture>

                    <local:Picture x:Name="BuildingFilterImage3" Width="200" Margin="5,0,0,0" 
                        Title="Sobel X" Description="Vertical edge detection.">
                        <local:Picture.Filter>
                            <itFilter:SobelX />
                        </local:Picture.Filter>
                    </local:Picture>

                    <local:Picture x:Name="BuildingFilterImage4" Width="200" Margin="5,0,0,0" Title="Blending" Description="Blend one image over the other." />
                </StackPanel>

                <StackPanel Orientation="Horizontal" Height="180" Margin="0,10,0,0">
                    <local:Picture x:Name="ResizeImage1" Width="200" 
                        Title="Normal Size" Description="Image has the default size." />

                    <local:Picture x:Name="ResizeImage2" Width="200" Margin="5,0,0,0" 
                        Title="Fitting size" Description="Height of the image is 900 pixels." />

                    <local:Picture x:Name="ResizeImage3" Width="200" Margin="5,0,0,0"           
                        Title="Medium size" Description="Height of the image is 200 pixels." />

                    <local:Picture x:Name="ResizeImage4" Width="200" Margin="5,0,0,0" 
                        Title="Small size" Description="Height of the image is 100 pixels." />
                </StackPanel>
            </StackPanel>
        </Grid>
    </ScrollViewer>
</navigation:Page>